<html>
	<head>
	<script type="text/javascript" src="/js/core.js"></script>
	<script type="text/javascript" src="/js/ajax.js"></script>
	
	</head>
	<body>
		<form>
		Text: <input type="text" id="nic" name="nic" size="40">
		<br>
		File: <input type="file" id="file" name="file" size="40"><br>
		<input type="button" id="ajaxbutton" value="AJAX IT" onclick="do_reg();">
		</form>
		<span id="loading" style="vertical-align: middle; visibility: hidden; float: color: red;" align="center"><img src="/image/ajax-loader.gif" /></span>
		
		<script type="text/javascript">

		
		function SendFormData(filename,param,handler)
			{	
				//Посылаем запрос
				SendRequest("POST",filename,param,handler);
			}	
		
		
		function do_reg()
		{
			var nic = document.getElementById("nic").value;
			var file = document.getElementById("file");
			var query = "nic="+nic+"&name="+name+"&file="+file.value;
			SendFormData("test.pl",query, ParsAnswer);
		}
		function ParsAnswer(Response)
			{
					alert(Response.responseText);
			}
	</script>
	</body>
<html>
